package com.yjd.comm.enums;

/**
 * Created by yjd-wap on 2017/8/28.
 */
public enum OrderRefuseEnum {

    A("A", "下错订单/取消订单"),
    B("B", "手术已做"),
    C("C", "其他");
    private String code;
    private String label;
    private OrderRefuseEnum(String code, String label) {
        this.code = code;
        this.label = label;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getLabel() {
        return label;
    }

    public void setLabel(String label) {
        this.label = label;
    }

    public static OrderRefuseEnum parse(String code) {
        for (OrderRefuseEnum v : OrderRefuseEnum.values()) {
            if (v.getCode().equals(code)) {
                return v;
            }
        }
        return null;
    }
}
